package com.syedu.day08;

/**
 * @Description 动物父类
 * @createTime 2022/3/17 9:23
 * @author Administrator
 */
public abstract class Animal {
    //公共属性写在父类中
    private String type;
    private String color;

    public Animal() {
        System.out.println("Animal.Animal");
    }

    public Animal(String type, String color) {
        this.type = type;
        this.color = color;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    //公共的方法写在父类中
    public abstract void eat();

    public abstract void sleep();
}
